<html>  
<head>  
<title>欢迎登录</title>   
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

</head>
<body>
<input id="ok1"/>
<button onclick="fun2()">ok</button>
<script >  
      function fun2(){  
        var ok = document.getElementById('ok1');
		//alert(ok.value);
		if( ok.value == '' )
			alert("empty");
       } 
	function fun1(){
		alert("CCC");
	}
</script> 
</body>
</html>